﻿using EagleProject.LinQDataContext;
using EagleProject.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace EagleProject.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }

        public ActionResult Partner()
        {
            ViewBag.Message = "Partners";

            return View();
        }

        public ActionResult WhyUs()
        {
            ViewBag.Message = "WhyUs";

            return View();
        }

        public ActionResult OurService()
        {
            ViewBag.Message = "OurService";

            return View();
        }

        public ActionResult Donation()
        {
            ViewBag.Message = "Donation";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }

        [HttpPost]
        public ActionResult Contact(ContactInfoModel model)
        {
            DatabaseController.CreateContactInfo(model);
            ViewBag.Result = "Thanks you for your suggestion !";
            return View();
        }


        public ActionResult JobSeeker()
        {
            ViewBag.Message = "Job Seeker page.";

            return View();
        }

        public ActionResult AccessDenied()
        {
            return View();
        }
    }
}
